home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !preview / RCS / c / update < prev    next >
Encoding:
Text File  |  1990-12-07  |  843 b   |  74 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.3
  10. date     91.03.02.14.12.03;  author gtoal;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     91.03.02.13.59.30;  author gtoal;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     91.03.02.13.56.17;  author gtoal;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @Initial release
  27. @
  28.  
  29.  
  30. 1.3
  31. log
  32. @Re-doing a lost change
  33. @
  34. text
  35. @#include <stdio.h>
  36.  
  37. int
  38. main (void)
  39. {
  40.   char s[1024];
  41.   int d, i, l;
  42.   FILE *f = fopen ("h.linkcount", "r+");
  43.  
  44.   l = fread (s, 1, 1024, f);
  45.   for (i = 0; s[i] != '/'; i++);
  46.   sscanf (&s[++i], "%d", &d);
  47.   sprintf (&s[i], "%d (\"__DATE__\")\"\n", ++d);
  48.   while (s[++i]);
  49.   fseek (f, 0, SEEK_SET);
  50.   fwrite (s, 1, i, f);
  51.   fclose(f);
  52.   return (0);
  53. }
  54. @
  55.  
  56.  
  57. 1.2
  58. log
  59. @IAY's upgrade
  60. @
  61. text
  62. @d17 1
  63. @
  64.  
  65.  
  66. 1.1
  67. log
  68. @Initial revision
  69. @
  70. text
  71. @a16 1
  72.   fclose(f);
  73. @
  74.